<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	<style type="text/css">
	.high
	{
		font-weight:bold;
		color:red;
	}
	.another
	{
		font-style:italic;
		color:blue;
	}
</style>
<script src="../../js/common/js/jquery-3.4.1.js"></script>
<script type="text/javascript">
	$(function(){
		//获取p标签的class
      	$("p").attr("class");
       //将p标签的class属性改成class+another
     	$("p").attr("class","another");
        //点击link交替两种样式
        $("#link").click(function(){
        	if($("#uu").attr("class")=="high")
        	{
        		$("#uu").attr("class","another")
        	}
        	else
        	{
        		$("#uu").attr("class","high")
        	}
        });
	})
</script>
</head>
<body>
	<h3>例子</h3>
	<p title="选择你最喜欢的水果" class="high" id="link">选择你最喜欢的水果</p>
	<ul id="uu">
		<li>苹果</li>
		<li>橘子</li>
		<li>菠萝</li>
	</ul>
</body>
</html>